<template>
    <div class="container">
        <van-collapse v-model="activeNames">
  <van-collapse-item :title="item.checkItemName" :name="item.checkItemId" v-for="item in listData" :key="item.checkItemId">
            
            <div v-for="items in item.dailyCheckDetailsSubItemResponseList" :key="items.checkContentId" style="margin-bottom:10px;padding:0 10px">
               <div> {{items.itemNo}}、{{items.itemContent}}</div>
                  <div class="height-10"></div>
               <div> 检查结果:
                <span v-if="items.checkResult==1" class="green">是</span>
                <span v-else class="red">否</span>
               </div>
            </div>
    </van-collapse-item>
</van-collapse>
    </div>
</template>
<script>
import axios from "axios";
export default {
    // props:[],
    // 页面加载
    created(){
  axios
              .post(
                "https://spaq.suzhou.gov.cn/ssa-rcjg-api/RCJD/findDailyCheckResultByUnitNameAndCheckFormNo",
                {
                  checkFormNo: this.$route.query.checkForMno,
                  unitName: this.$route.query.checkUnitName,
                }
              )
              .then((res) => {
                if (res.data.code == 200) {
                  this.listData = res.data.data[0].dailyCheckDetailsHandleResponseList;
                }
              });

    },
    // 页面加载完成
    mounted(){
    
    },
    //实例销毁之前
      beforeDestroy(){
  },
    //实例销毁后
         destroyed(){
            },
    data(){
        return{
            activeNames:[],
            listData:[]
        }
    },
    // 方法
    methods:{
    
    },
    // 监听属性
    watch:{
    
    },
    // 组件
    components:{
    
    },
    // 计算属性
    computed: {
        
    },

}
</script>

<style lang="scss" scoped>
.container {
    
/deep/ .van-collapse-item__content{
    color: #000000;
     font-size: 14px!important;
}
/deep/ .van-cell{
        font-size: 16px!important;

} .height-10 {
    height: 10px;
  }

    /* --color: red; */
    --red: #ff0000;
    --green: #008000;
    --yellow: #ffd700;
  .red{
    color: var(--red);
  }
  .green{
    color: var(--green);
  }
}
</style>